package com.neu.service;

import com.neu.bean.Rotation;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

public interface IService {

    @GET("/prod-api/api/rotation/list")
    public Call<ResponseBody> getBody(@QueryMap Map<String,Object> param);

    @GET("/prod-api/api/rotation/list")
    public Call<Rotation> getRotation(@QueryMap Map<String,Object> param);

    @GET
    public Call<String> get(@Url String url);

    /**
     * post方法接口封装
     * @param url
     * @return
     */
    @POST
    @Headers({"Content-type:application/json;charset=UTF-8"})
    public  Call<String> post(@Url String url, @Body RequestBody requestBody);

    /**
     *
     * @param url
     * @param
     * @return
     */
    @PUT
    @Headers({"Content-type:application/json;charset=UTF-8"})
    public Call<String> put(@Url String url, @Body RequestBody requestBody);
}
